package com.erp.erp_entitys.BillExchangeInfo;

import com.erp.annotation.PropertyMsg;
import com.erp.erp_entitys.business.entity.CarryDetailCostEntity;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 结汇费用表(BillExchangeCostInfo)实体类
 *
 * @author cj
 * @since 2021-01-17 21:10:20
 */
public class BillExchangeCostInfo implements Serializable {
    private static final long serialVersionUID = -27727515995883181L;
    /**
     * 主键
     */
    private Long id;
    /**
     * 结汇主表id
     */
    private Integer parentId;
    /**
     * 费用类型（数据字典选择）
     */
    @PropertyMsg("费用类型")
    private Integer costType;
    /**
     * 费用金额
     */
    @PropertyMsg("费用金额")
    private BigDecimal costMoney;
    /**
     * 费用描述
     */
    private String costDesc;
    /**
     * 外销合同号
     */
    private String contractNo;

    public BillExchangeCostInfo(CarryDetailCostEntity cos) {
        if(cos.getTypeCode()!=null&&cos.getTypeCode()!=""){
            this.costType = Integer.parseInt(cos.getTypeCode());
        }
        if(cos.getAmount()!=null){
            this.costMoney =cos.getAmount();
        }
        if(cos.getMemo()!=null&&cos.getMemo()!=""){
            this.costDesc = cos.getMemo();
        }
       if(cos.getContractNo()!=null&&cos.getContractNo()!=""){
           this.contractNo = cos.getContractNo();
       }
    }


    public BillExchangeCostInfo() {
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public Integer getCostType() {
        return costType;
    }

    public void setCostType(Integer costType) {
        this.costType = costType;
    }

    public BigDecimal getCostMoney() {
        return costMoney;
    }

    public void setCostMoney(BigDecimal costMoney) {
        this.costMoney = costMoney;
    }

    public String getCostDesc() {
        return costDesc;
    }

    public void setCostDesc(String costDesc) {
        this.costDesc = costDesc;
    }

    public String getContractNo() {
        return contractNo;
    }

    public void setContractNo(String contractNo) {
        this.contractNo = contractNo;
    }


}